package com.huiminpay.transaction.api;

import com.huiminpay.common.cache.domain.BusinessException;
import com.huiminpay.paymentagent.api.conf.AliConfigParam;
import com.huiminpay.paymentagent.api.dto.PaymentResponseDTO;
import com.huiminpay.transaction.api.dto.PayChannelDTO;
import com.huiminpay.transaction.api.dto.PayChannelParamDTO;
import com.huiminpay.transaction.api.dto.PlatformChannelDTO;

import java.util.List;

/**
 * @ClassName PayChannelService
 * @Author: longlong
 * @CreateDate: 2023/12/6 17:28
 */

public interface PayChannelService {

    /**
     * \* 获取平台服务类型
     * \* @return
     */
    List<PlatformChannelDTO> queryPlatformChannel() throws BusinessException;

    /**
     * 为app绑定平台服务类型
     *
     * @param: appId:应用id   platformChannelCodes:平台服务类型列表
     * @return:
     */
    void bindPlatformChannelForApp(String appId, String platformChannelCodes) throws BusinessException;

    /**
     * 交易服务 查询绑定状态
     *
     * @param:
     * @return:
     */
    int queryAppBindPlatformChannel(String appId, String platformChannelCodes) throws BusinessException;

    /**
     * \* 根据平台服务类型获取支付渠道列表
     * \* @param platformChannelCode
     * \* @return
     */
    List<PayChannelDTO> queryPayChannelByPlatformChannel(String platformChannelCode) throws BusinessException;


    /**交易服务 5.4.4 交易服务-支付渠道参数配置接口(接口⑦)
     * @param:
     * @return:
     */
    void savePayChannelParam(PayChannelParamDTO dto) throws BusinessException;


    /**
     * 根据应用和服务类型查询支付渠道参数列表     结果可能是多个(支付宝param 微信param)
     * @param appId 应用id
     * @param platformChannel 服务类型code
     * @return
     */

    List<PayChannelParamDTO> queryPayChannelParamByAppAndPlatform(String appId, String platformChannel) throws BusinessException;

    /**
     \* 获取指定应用指定服务类型下所包含的某个原始支付参数
     \* @param appId
     \* @param platformChannel
     \* @param payChannel
     \* @return
     \* @throws BusinessException
     */
    PayChannelParamDTO queryParamByAppPlatformAndPayChannel(String appId, String platformChannel,String payChannel) throws BusinessException;



}
